package com.hsjk.szwj.module.system.api.service;

import com.hsjk.szwj.module.system.api.service.dto.ServiceDTO;
import com.hsjk.szwj.module.system.convert.service.ServiceConvert;
import com.hsjk.szwj.module.system.dal.dataobject.service.ServiceDO;
import com.hsjk.szwj.module.system.dal.mysql.service.ServiceMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/09/05 11:08
 **/
@Service
public class ServiceApiImpl implements IServiceApi{
    @Resource
    private ServiceMapper serviceMapper;

    @Override
    public ServiceDTO getServiceById(Long id) {
        ServiceDO serviceDO = serviceMapper.selectById(id);
        return ServiceConvert.INSTANCE.convertServiceDTO(serviceDO);
    }
}
